package com.kuhyygy.activity;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;

import com.kuhyygy.R;
import com.kuhyygy.adapter.EmotionAdapter;
import com.kuhyygy.bean.Emotion;

public class EmotionActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.emotonlistview);
		List<Emotion> list = initEmotions();
		EmotionAdapter ea = new EmotionAdapter(EmotionActivity.this, R.layout.emotionitem, list);
		ListView lv = (ListView) this.findViewById(R.id.emotionItem);
		lv.setAdapter(ea);
	}

	private List<Emotion> initEmotions() {
		List<Emotion> list = new ArrayList<Emotion>();
		Emotion e1 = new Emotion(R.drawable.happy1_easyicon_net_48, "happy1");
		Emotion e2 = new Emotion(R.drawable.happy2_easyicon_net_48, "happy2");
		Emotion e3 = new Emotion(R.drawable.happy3_easyicon_net_48, "happy3");
		Emotion e4 = new Emotion(R.drawable.happy4_easyicon_net_48, "happy4");
		Emotion e5 = new Emotion(R.drawable.happy5_easyicon_net_48, "happy5");
		Emotion e6 = new Emotion(R.drawable.happy6_easyicon_net_48, "happy6");
		Emotion e7 = new Emotion(R.drawable.happy7_easyicon_net_48, "happy7");
		list.add(e1);list.add(e2);list.add(e3);list.add(e4);
		list.add(e5);list.add(e6);list.add(e7);
		return list;
	}

	
}
